<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE html>
<html lang="en">
	<head>
	<base href="<%=basePath%>"><!-- jsp文件头和头部 -->
	<%@ include file="../../system/main/main_top.jsp"%> 
	</head>
<body>
<div class="container-fluid" id="main-container">
<div id="page-content" class="clearfix">
  <div class="row-fluid">
	<div class="row-fluid">
			<!-- 检索  -->
			<form action="marketmanager/list.do" method="post" name="Form" id="Form">
			<table>
				<tr>
					<td>
						<span class="input-icon">
							<input autocomplete="off" id="nav-search-input" type="text" name="keyword" value="${pd.keyword}" placeholder="这里输入手机号码" />
							<i id="nav-search-icon" class="icon-search"></i>
						</span>
					</td>
					<td style="vertical-align:top;"><button class="btn btn-mini btn-light" onclick="search();"  title="检索"><i id="nav-search-icon" class="icon-search"></i></button></td>
					<td style="vertical-align:top;"><a class="btn btn-mini btn-light" onclick="queryListAllMarkets();" title="所有营销经理">查看所有&nbsp;&nbsp;<i id="nav-search-icon" class="icon-group"></i></a></td>
				</tr>
				<tr>
					<li>
						<i class="icon-circle green"></i>操作指南：<strong>通过手机号码查询用户设置为营销经理</strong>
					</li>
				</tr>
			</table>
			<!-- 检索  -->
		
			<table id="table_report" class="table table-striped table-bordered table-hover">
				<thead>
					<tr>
						<th>ID</th>
						<th>手机号码</th>
						<th>昵称</th>
						<th>性别</th>
						<th>平台等级</th>
						<th>是否启用</th>
						<th>是否锁定</th>
						<th>注册时间</th>
						<th>登录时间</th>
						<th>礼物总数</th>
						<th class="center">操作</th>
					</tr>
				</thead>
										
				<tbody>
					
				<!-- 开始循环 -->	
				<c:choose>
					<c:when test="${not empty varList}">
						<c:forEach items="${varList}" var="var" varStatus="vs">
							<tr>
									<td>${var.m_id}</td>
									<td>${var.mobile}</td>
									<td>${var.username}</td>
									<td>
										<c:choose>
											<c:when test="${var.gender == 1 }">
												男
											</c:when>
											<c:otherwise>
												女
											</c:otherwise>
										</c:choose>
									</td>
									<td>${var.member_rank_sys}</td>
									
									<td>
										<c:choose>
											<c:when test="${var.is_enabled eq true }">
												启用
											</c:when>
											<c:otherwise>
												未启用
											</c:otherwise>
										</c:choose>
									</td>
									<td>
										<c:choose>
											<c:when test="${var.is_locked eq true }">
												锁定
											</c:when>
											<c:otherwise>
												未锁定
											</c:otherwise>
										</c:choose>
									</td>
									
									<td><fmt:formatDate value="${var.create_date}" pattern="yyyy-MM-dd HH:mm:ss"/> </td>
									<td><fmt:formatDate value="${var.login_date}" pattern="yyyy-MM-dd HH:mm:ss"/> </td>
									<td>${var.gift_total}</td>
									<td style="width: 60px;" class="center">
										<!-- 
										<span class="label label-large label-grey arrowed-in-right arrowed-in"><i class="icon-lock" title="无权限"></i></span>
										 -->
										<div>
											<a class='btn btn-mini btn-info' title="编辑" onclick="edit('${var.m_id}');"><i class='icon-edit'></i></a>
										</div>
									</td>
							</tr>
						</c:forEach>
						<!-- 
						<tr>
							<td colspan="100" class="center">您无权查看</td>
						</tr>
						 -->
					</c:when>
					<c:otherwise>
						<tr class="main_info">
							<td colspan="100" class="center" >没有相关数据</td>
						</tr>
					</c:otherwise>
				</c:choose>
				</tbody>
			</table>
			
		<div class="page-header position-relative">
		<table style="width:100%;">
			<tr>
				<td style="vertical-align:top;">
					&nbsp;
				</td>
				<td style="vertical-align:top;"><div class="pagination" style="float: right;padding-top: 0px;margin-top: 0px;">${page.pageStr}</div></td>
			</tr>
		</table>
		</div>
		</form>
	</div>
 
	<!-- PAGE CONTENT ENDS HERE -->
  </div><!--/row-->
	
</div><!--/#page-content-->
</div><!--/.fluid-container#main-container-->
		
		<!-- 返回顶部  -->
		<a href="#" id="btn-scroll-up" class="btn btn-small btn-inverse">
			<i class="icon-double-angle-up icon-only"></i>
		</a>
		
		<!-- 引入 -->
		<script type="text/javascript">window.jQuery || document.write("<script src='static/js/jquery-1.9.1.min.js'>\x3C/script>");</script>
		<script src="static/js/bootstrap.min.js"></script>
		<script src="static/js/ace-elements.min.js"></script>
		<script src="static/js/ace.min.js"></script>
		<!-- 引入 -->
		
		<script type="text/javascript">
		
		$(top.hangge());
		
		//检索
		function search(){
			top.jzts();
			$("#Form").submit();
		}
		
		//修改
		function edit(Id){
			 top.jzts();
			 var diag = new top.Dialog();
			 diag.Drag=true;
			 diag.Title ="编辑";
			 diag.URL = '<%=basePath%>/marketmanager/goEdit.do?m_id='+Id;
			 diag.Width = 300;
			 diag.Height = 95;
			 diag.CancelEvent = function(){ //关闭事件
				 search();
				 if(diag.innerFrame.contentWindow.document.getElementById('centerOfMainFrame').style.display == 'none'){
					 nextPage(${page.currentPage});
				}
				diag.close();
			 };
			 diag.show();
		}
		
		function queryListAllMarkets(){
			$("#nav-search-input").val("");
			search();
		}
		
		</script>
		
		<style type="text/css">
		li {list-style-type:none;}
		</style>
		<ul class="navigationTabs">
            <li><a></a></li>
            <li></li>
        </ul>
	</body>
</html>

